package au.com.iglootech.winerymap.entity;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;
import com.google.appengine.api.datastore.Text;

/**
 * 
 * @author Nicholas Zhu
 * 
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
public class WineryInfo implements IGTDomainEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7764220064601719977L;
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@Persistent
	private String companyName;

	@Persistent
	private String contactNumber;

	@Persistent
	private String tfn;

	@Persistent
	private String email;
	@Persistent
	private String address1;
	@Persistent
	private String address2;
	@Persistent
	private String address3;
	@Persistent
	private String contactName;
	@Persistent
	private Text description;
	@Persistent
	private Double lat;
	@Persistent
	private Double lng;
	@Persistent
	private String website;
	@Persistent
	private String region;
	@Persistent
	private String tradeName;
	@Persistent
	private String telephone;
	@Persistent
	private String winemaker;
	@Persistent
	private String wineryards;
	@Persistent
	private String facsimilie;

	@Persistent
	private Boolean valid = true;

	/**
	 * @return the companyName
	 */
	public String getCompanyName() {
		return companyName;
	}

	/**
	 * @param companyName
	 *            the companyName to set
	 */
	public void setCompanyName(final String companyName) {
		this.companyName = companyName;
	}

	/**
	 * @return the contactNumber
	 */
	public String getContactNumber() {
		return contactNumber;
	}

	/**
	 * @param contactNumber
	 *            the contactNumber to set
	 */
	public void setContactNumber(final String contactNumber) {
		this.contactNumber = contactNumber;
	}

	/**
	 * @return the tfn
	 */
	public String getTfn() {
		return tfn;
	}

	/**
	 * @param tfn
	 *            the tfn to set
	 */
	public void setTfn(final String tfn) {
		this.tfn = tfn;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email
	 *            the email to set
	 */
	public void setEmail(final String email) {
		this.email = email;
	}

	/**
	 * @return the address1
	 */
	public String getAddress1() {
		return address1;
	}

	/**
	 * @param address1
	 *            the address1 to set
	 */
	public void setAddress1(final String address1) {
		this.address1 = address1;
	}

	/**
	 * @return the address2
	 */
	public String getAddress2() {
		return address2;
	}

	/**
	 * @param address2
	 *            the address2 to set
	 */
	public void setAddress2(final String address2) {
		this.address2 = address2;
	}

	/**
	 * @return the address3
	 */
	public String getAddress3() {
		return address3;
	}

	/**
	 * @param address3
	 *            the address3 to set
	 */
	public void setAddress3(final String address3) {
		this.address3 = address3;
	}

	/**
	 * @return the contactName
	 */
	public String getContactName() {
		return contactName;
	}

	/**
	 * @param contactName
	 *            the contactName to set
	 */
	public void setContactName(final String contactName) {
		this.contactName = contactName;
	}

	/**
	 * @return the description
	 */
	public Text getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(final Text description) {
		this.description = description;
	}

	@Override
	public Key getKey() {
		return key;
	}

	@Override
	public void setKey(final Key key) {
		this.key = key;
	}

	@Override
	public String toLogString() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Key createBy() {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * 
	 * @return string of key
	 */
	public String getKeyValue() {
		return KeyFactory.keyToString(key);
	}

	/**
	 * 
	 * @param keyValue
	 *            string of key
	 */
	public void setKeyValue(final String keyValue) {
		key = KeyFactory.stringToKey(keyValue);
	}

	/**
	 * @return the valid
	 */
	public Boolean getValid() {
		return valid;
	}

	/**
	 * @param valid
	 *            the valid to set
	 */
	public void setValid(final Boolean valid) {
		this.valid = valid;
	}

	/**
	 * @return the lat
	 */
	public Double getLat() {
		return lat;
	}

	/**
	 * @param lat the lat to set
	 */
	public void setLat(Double lat) {
		this.lat = lat;
	}

	/**
	 * @return the lng
	 */
	public Double getLng() {
		return lng;
	}

	/**
	 * @param lng the lng to set
	 */
	public void setLng(Double lng) {
		this.lng = lng;
	}

	/**
	 * @return the website
	 */
	public String getWebsite() {
		return website;
	}

	/**
	 * @param website the website to set
	 */
	public void setWebsite(String website) {
		this.website = website;
	}

	/**
	 * @return the region
	 */
	public String getRegion() {
		return region;
	}

	/**
	 * @param region the region to set
	 */
	public void setRegion(String region) {
		this.region = region;
	}

	/**
	 * @return the tradeName
	 */
	public String getTradeName() {
		return tradeName;
	}

	/**
	 * @param tradeName the tradeName to set
	 */
	public void setTradeName(String tradeName) {
		this.tradeName = tradeName;
	}

	/**
	 * @return the telephone
	 */
	public String getTelephone() {
		return telephone;
	}

	/**
	 * @param telephone the telephone to set
	 */
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	/**
	 * @return the winemaker
	 */
	public String getWinemaker() {
		return winemaker;
	}

	/**
	 * @param winemaker the winemaker to set
	 */
	public void setWinemaker(String winemaker) {
		this.winemaker = winemaker;
	}

	/**
	 * @return the wineryards
	 */
	public String getWineryards() {
		return wineryards;
	}

	/**
	 * @param wineryards the wineryards to set
	 */
	public void setWineryards(String wineryards) {
		this.wineryards = wineryards;
	}

	/**
	 * @return the facsimilie
	 */
	public String getFacsimilie() {
		return facsimilie;
	}

	/**
	 * @param facsimilie the facsimilie to set
	 */
	public void setFacsimilie(String facsimilie) {
		this.facsimilie = facsimilie;
	}
	
	

}
